From: Matthias Clasen Date: Wed, 12 Oct 2022 18:52:57 +0000 (-0400) Subject: inspector: Use gtk_widget_get_style_color X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~9^2~181^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=812a879ec2b7506c08a179691ec15a1eaaa280f8;p=gtk4.git inspector: Use gtk_widget_get_style_color The graph renderer in the statistics page needs the CSS foreground color to draw the graph. Use the just introduced api for it. --- diff --git a/gtk/inspector/graphrenderer.c b/gtk/inspector/graphrenderer.c index 595f82213e..0fb1f0d427 100644 --- a/gtk/inspector/graphrenderer.c +++ b/gtk/inspector/graphrenderer.c @@ -22,7 +22,6 @@ #include "graphdata.h" #include "gtksnapshot.h" -#include "deprecated/gtkstylecontext.h" enum { PROP_0, @@ -131,7 +130,6 @@ graph_renderer_snapshot (GtkWidget *widget, GtkSnapshot *snapshot) { GraphRenderer *self = GRAPH_RENDERER (widget); - GtkStyleContext *context; double minimum, maximum, diff; double x, y, width, height; cairo_t *cr; @@ -155,10 +153,7 @@ graph_renderer_snapshot (GtkWidget *widget, diff = maximum - minimum; -G_GNUC_BEGIN_IGNORE_DEPRECATIONS - context = gtk_widget_get_style_context (widget); - gtk_style_context_get_color (context, &color); -G_GNUC_END_IGNORE_DEPRECATIONS + gtk_widget_get_style_color (widget, &color); cr = gtk_snapshot_append_cairo (snapshot, &GRAPHENE_RECT_INIT (